﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.OleDb;
namespace WindowsFormsApplication3
{
    public partial class LoginForm : Form
    {
   

        public LoginForm()
        {
            InitializeComponent();
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            Application.Exit();

        }

        private void btnLog_Click(object sender, EventArgs e)
        {
            try
            {
                if (txtUsername.Text.Trim() == null || txtUsername.Text.Trim() == "")
                {
                    MessageBox.Show("Enter an valid username");
                    txtUsername.Focus();
                    txtUsername.Text = "";

                }
                else if (txtPassword.Text.Trim() == null || txtPassword.Text.Trim() == "")
                {
                    MessageBox.Show("Enter an valid password");
                    txtPassword.Focus();
                    txtPassword.Text = "";
                }

                else
                {
                    Uname = txtUsername.Text;
                    Pwd = txtPassword.Text;
                  

                }
            }
            catch (Exception eps)
            {



                Console.WriteLine("Error", eps);



            }


            

        }
        public string Uname;
        public string Pwd;
        private void LoginForm_Load(object sender, EventArgs e)
        {

        }

        private void LoginForm_FormClosing(object sender, FormClosingEventArgs e)
        {
         
        }

       
    }
}
